package com.hb.cloud.srv.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @date 2019/1/23
 */
@RestController
@RequestMapping("srv")
public class SrvController {

    private final Logger LOGGER = LoggerFactory.getLogger(getClass());

    @RequestMapping(value = "say/{str}", method = RequestMethod.GET)
    public String say(@PathVariable String str) {
        LOGGER.info(String.format("请求内容: %s", str));
        return "hello " + str;
    }
}
